const { TopListProxy } = require('../proxys')
module.exports = class TopListController {
  static async getList (ctx) {
    const cookie = ctx.get('Cookie') ? ctx.get('Cookie') : ''
    // const { idx } = ctx.query
    let result = await TopListProxy.getList(cookie, '3778678')
    result = JSON.parse(result)
    ctx.status = 200
    ctx.response.type = 'json'
    ctx.response.body = {
      code: 0,
      data: result.playlist
    }
  }
}